package com.wechat.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * Created by ycx on 2018/4/19.
 */
@Configuration
public class ConfigAdapter extends WebMvcConfigurerAdapter {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new LoginInterceptor()).addPathPatterns("/api/v1/background/question_lib_list");
        registry.addInterceptor(new LoginInterceptor()).addPathPatterns("/api/v1/background/answer_list");
        registry.addInterceptor(new LoginInterceptor()).addPathPatterns("/api/v1/background/question_list");
        registry.addInterceptor(new LoginInterceptor()).addPathPatterns("/api/v1/background/see_answer");
        registry.addInterceptor(new LoginInterceptor()).addPathPatterns("/api/v1/background/see_question");
        registry.addInterceptor(new LoginInterceptor()).addPathPatterns("/api/v1/background/see_red_packet");
        registry.addInterceptor(new LoginInterceptor()).addPathPatterns("/api/v1/background/user_list");
        registry.addInterceptor(new LoginInterceptor()).addPathPatterns("/api/v1/background/withdrawcash_records_list");
    }

}
